<?php


namespace App\Modules\Health;


use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Route;

class RouteServiceProvider extends ServiceProvider
{
    protected $moduleNamespace = 'App\Modules\Health\Http\Controllers';

    public function boot()
    {
        parent::boot();
    }

    public function map()
    {
        Route::prefix(config('admin.route.prefix'))
            ->middleware(config('admin.route.middleware'))
            ->namespace($this->moduleNamespace)
            ->as('dcat.admin.')
            ->group(__DIR__ . '/admin.php');

        Route::prefix('api')
            ->middleware(['api', 'mini_type.check'])
            ->namespace($this->moduleNamespace)
            ->group(__DIR__ . '/api.php');
    }
}
